<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>对象的扩展</title>
    <script>
        let user={
            id:10086,
            name:"ldh",
            age:50,
            address: "浦东航头",
            key:"kkk"
        }

       let userKeys =  Object.keys(user);
       let userValues =  Object.values(user);

       userKeys.forEach(key=>{
           //user[key] 表达的意思为 从user对象中根据变量key值作为属性来取值，类似与user.id
           console.log(key+":"+user[key]);
       })

    </script>
</head>
<body>

</body>
</html>